<?php $this->_extends('_layouts/basic_layout'); ?>

<?php $this->_block('resource'); ?>
<script type="text/javascript" src="<?php echo $plugin_url; ?>jquery-confirm/jquery.confirm.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $plugin_url; ?>jquery-confirm/jquery.confirm.css" />

<?php $this->_endblock(); ?>

<?php $this->_block('title'); ?>
	Jquery Plugins
<?php $this->_endblock(); ?>

<?php $this->_block('admin_contents'); ?>
<div class="row-fluid">	
	<a class="btn btn-info" href="<?php echo url('jqueryplugins/add'); ?>">添加</a>
</div>

<div class="row-fluid">		<!-- sortable ui-sortable -->
	<div class="box span12">
		<div data-original-title="" class="box-header well">
			<h2><i class="icon-user"></i> 已添加的Jquery插件</h2>
		</div>
		<div class="box-content">
			<div role="grid">
				<table class="table table-striped table-bordered">		<!--  bootstrap-datatable datatable dataTable -->
					<thead>
						<tr role="row">
							<th style="width:5%">名称</th>
							<th style="width:5%">类别</th>
							<th style="width:10%">描述(简述)</th>
							<th style="width:5%">根目录文件夹</th>
							<th style="width:5%">缩略图 </th>
							<th style="width:5%">下载包</th>
							<th style="width:3%">点击数</th>
							<th style="width:10%">生成日期</th>
							<th style="width:10%">操作</th>
						</tr>
					</thead>
					
					<tbody>
						<?php if(!empty($jqueryplugins)): foreach($jqueryplugins as $jp): ?>
							<tr>
								<td class="name"><?php echo $jp['name']; ?></td>
								<td class="name">
									<?php echo $jp['type_name']; ?><br />
									<?php echo $jp['type_name_en']; ?>
										
								</td>
								<td class="description"><?php echo $jp['sketch']; ?></td>
								<td class="root_foldername"><?php echo $jp['root_foldername']; ?></td>
								<td class="thumb">
									<img alt="<?php echo $jp['name']; ?>" width="100" height="70" src="<?php echo $jqplugin_url . $jp['root_foldername'] . '/' . $jp['thumbnail']; ?>" /> <br />
									<?php echo $jp['thumbnail']; ?>
								</td>
								<td class="download_pack"><?php echo $jp['download_pack']; ?></td>
								<td><?php echo $jp['view_num']; ?></td>
								<td><?php echo $jp['created_date']; ?></td>
								<td>
									<a href="<?php echo url('jqueryplugins/edit', array('id' => $jp['id'])); ?>" class="btn btn-info edit_btn">
										<i class="icon-edit icon-white"></i>  
										编辑                                        
									</a>
									<a href="<?php echo url('jqueryplugins/index', array('ope' => 'delete', 'id' => $jp['id'])); ?>" class="btn btn-danger delete_btn">
										<i class="icon-trash icon-white"></i> 
										删除
									</a>
								</td>
							</tr>
						<?php endforeach; endif; ?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<?php $this->_endblock(); ?>